package com.itheima.charest;

import java.io.UnsupportedEncodingException;
import java.util.Arrays;

public class CharStreamDemo01 {
    public static void main(String[] args) throws UnsupportedEncodingException {
        method1();
      byte[] bytes1={-24, -65, -86, -28, -72, -67, -25, -125, -83, -27, -73, -76};
      String s1=new String(bytes1);
        System.out.println(s1);
    }

    private static void method1() throws UnsupportedEncodingException {
        String s="迪丽热巴";
        byte[] bytes1 = s.getBytes();
        System.out.println(Arrays.toString(bytes1));
        byte[] bytes2 = s.getBytes("gbk");
        System.out.println(Arrays.toString(bytes2));
    }
}
